package adapter.practice_04;

import org.apache.log4j.Logger;

/**
 * 对象适配器
 *
 * <br>实现旧接口(目标接口)，聚合被适配接口
 *
 * @author yi qiang
 * @date 2021/6/28 23:05
 */
public class Adapter implements HkPanel{

    private final Logger logger = Logger.getLogger("Adapter");

    private final GbPanel gbPanel;

    public Adapter(GbPanel gbPanel){
        this.gbPanel=gbPanel;
    }


    @Override
    public void plugin() {
        logger.info("已接通适配器,将HkPanel转化为GbPanel");
        gbPanel.plugin();
    }
}
